import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

//主页
import Home from "@/views/Home";
//课程页面
import Course from "@/views/Course";
//导航页
import Navigation from "@/views/Navigation";

//登录
import Login from "@/components/login/Login"
//注册
import Register from "@/components/login/Register"
//码云
import Gitee from "@/components/login/Gitee"
//Github
import Github from "@/components/login/Github"

//单个课程
import CourseDetails from "@/components/course/CourseDetails"
//课程视频界面
import CourseVideo from "@/components/course/CourseVideo"
//课程聊天室
import CourseChartRoom from "@/components/course/CourseChartRoom";


const routes = [
  {path: '/', name: 'Home', component: Home},
  {path: '/course', name: 'Course', component: Course},
  {path: '/navigation', name: 'Navigation', component: Navigation},

  {path: '/login', name: 'Login', component: Login},
  {path: '/register', name: 'Register', component: Register},
  {path: '/login/gitee', name: 'Gitee', component: Gitee},
  {path: '/login/github', name: 'Github', component: Github},

  {path: '/courseDetails', name: 'CourseDetails', component: CourseDetails},
  {path: '/courseVideo', name: 'CourseVideo', component: CourseVideo},
  {path: '/courseChartRoom', name: 'CourseChartRoom', component: CourseChartRoom},
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
